home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 June / ccd0605.iso / Software / Freeware / Programare / highlight / highlight-W32GUI-2.2-10b-Setup.exe / {app} / src / ASStreamIterator.h < prev    next >
C/C++ Source or Header  |  2004-02-01  |  1KB  |  55 lines

  1. /*
  2.  * Copyright (c) 1998,1999,2000,2001,2002 Tal Davidson. All rights reserved.
  3.  *
  4.  * compiler_defines.h   (1 January 1999)
  5.  * by Tal Davidson (davidsont@bigfoot.com)
  6.  * This file is a part of "Artistic Style" - an indentater and reformatter
  7.  * of C, C++, C# and Java source files.
  8.  *
  9.  * The "Artistic Style" project, including all files needed to compile it,
  10.  * is free software; you can redistribute it and/or use it and/or modify it
  11.  * under the terms of the GNU General Public License as published 
  12.  * by the Free Software Foundation; either version 2 of the License, 
  13.  * or (at your option) any later version.
  14.  *
  15.  * This program is distributed in the hope that it will be useful,
  16.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  18.  *
  19.  * You should have received a copy of the GNU General Public
  20.  * License along with this program.
  21.  */
  22.  
  23.  
  24. #ifndef ASSTREAMITERATOR_H
  25. #define ASSTREAMITERATOR_H
  26.  
  27. #include "ASSourceIterator.h"
  28.  
  29. #ifdef USES_NAMESPACE
  30. using namespace std;
  31.  
  32. namespace astyle
  33.   {
  34. #endif
  35.  
  36.   class ASStreamIterator :
  37.         public ASSourceIterator
  38.     {
  39.     public:
  40.       ASStreamIterator(istream *in);
  41.       virtual ~ASStreamIterator();
  42.       bool hasMoreLines() const;
  43.       string nextLine();
  44.  
  45.     private:
  46.       istream * inStream;
  47.       char buffer[2048];
  48.     };
  49.  
  50. #ifdef USES_NAMESPACE
  51. }
  52. #endif
  53.  
  54. #endif
  55.